﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ribbonItems.aspx.cs" Inherits="HideRibbonItems.Layouts.HideRibbonItems.ribbonItems" DynamicMasterPageFile="~masterurl/default.master" %>

<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">

</asp:Content>

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
<div style="padding:10px">
<b>Grauers Ribbon items hider</b><br />
Use this control to select a document library where you want to hide ribbon items. For example, hide "Open Explorer" in "Documents" library. 
<br />Select library=Documents
<br />Select Ribbon.Library.Actions.OpenWithExplorer

<br /><br />
You can use groups choice if you don't want to hide the item for the specific members. For example hide "Open Explorer" in "Documents" library but not for Full Controls group
<br />Select library=Documents
<br />Select Ribbon.Library.Actions.OpenWithExplorer
<br />Select "Full Control Group"
    <table cellpadding="3">
        <tr>
            <td>Library</td>
            <td>Ribbon menu</td>
            <td>Group</td>
        </tr>
        <tr>
            <td valign="top">
                <asp:ListBox Width="200px" ID="librariesListBox" runat="server" Height="300px" SelectionMode="Multiple" />
            </td>
            <td valign="top">
                <asp:ListBox ID="ribbonItemsListBox" runat="server" Width="300px" Height="300px" SelectionMode="Multiple" />
            </td>
            <td valign="top">
                <asp:ListBox ID="groupListBox" runat="server" Width="200px" Height="300px" SelectionMode="Multiple" />
            </td>
        </tr>
        <tr>
            <td colspan="3" align="right">
                <asp:ImageButton OnClick="cancelImg_Click" style="border:none;" Visible="false" id="cancelImg" runat="server" />&nbsp;
                <asp:ImageButton OnClick="saveImg_Click" style="border:none;" Visible="false" id="saveImg" runat="server" />&nbsp;
                <asp:ImageButton ID="addImageButton" runat="server" OnClick="addImageButton_Click" />
            </td>
        </tr>
    </table>
    

    

    <asp:Repeater ID="documentRibbonRepeater" runat="server" OnItemDataBound="documentRibbonRepeater_ItemDataBound">
        <HeaderTemplate>
            <div style="border:solid 1px #c0c0c0;width:770px;">
        </HeaderTemplate>    
        <ItemTemplate>
               <table style="" id="documentribbonTable" runat="server">
                 <tr>
                    <td valign="top" style="width:200px;max-width:200px;word-wrap:break-word;">
                        <asp:Literal runat="server" ID="documentsLiteral" />
                    </td>
                    <td valign="top" style="width:300px;max-width:300px;word-wrap:break-word;">
                        <asp:Literal runat="server" ID="ribbonItemsLiteral" />
                    </td>
                    <td valign="top" style="width:200px;max-width:200px;word-wrap:break-word;">
                        <asp:Literal runat="server" ID="groupsLiteral" />
                    </td>
                    <td valign="top" style="width:70px">                                                
                        <asp:ImageButton OnClick="editImg_Click" style="border:none;" id="editImg" runat="server" />&nbsp;
                        <asp:ImageButton OnClick="deleteImg_Click" style="border:none;" id="deleteImg" runat="server" />
                    </td>
                 </tr>                 
               </table>
        </ItemTemplate>
        <FooterTemplate>
            </div>
        </FooterTemplate>
    </asp:Repeater>
    </div>
</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
Application Page
</asp:Content>

<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server" >
My Application Page
</asp:Content>
